//
//  ActivityShop.swift
//  zpzk_shop
//
//  Created by Qingke on 16/5/26.
//  Copyright © 2016年 Qingke. All rights reserved.
//

import Foundation
import UIKit
class ActivityShop {
    var shopName:String     = ""
    var shopDiscount:Double = 0.0
    var shopImageUrl:String = ""
    
    class func getActivityShop(data: AnyObject?) -> [ActivityShop]{
        var activityShops = [ActivityShop]()
        if let shops      = data!["hot_brands"] as? [[String: AnyObject]] {
            for shopAtIndex in shops {
                let activityShop = ActivityShop()
                
                activityShop.shopDiscount = shopAtIndex["discount"] as! Double
                activityShop.shopName     = shopAtIndex["name"] as! String
                activityShop.shopImageUrl = shopAtIndex["img_url"] as! String
                
                activityShops.append(activityShop)
            }
            
        }
//        print("activityShop: " + "\(activityShops)")
        return activityShops
    }
    
    
}